#include <fstream>
#include <iostream>


#include "FileUtils/String.h"
using namespace std;
#ifndef DATA
#define DATA
namespace gengine
{
namespace utils
{
class Data
{
private:
	
	int fileLenght;
	int numLines;
	String fname;
	String fileData;
	
public:
	Data()
	{
		fileLenght = 0;
		numLines = 0;
		fileData = "";
	}
	Data(const String &name,char*ptr,int len)
	{
		fileLenght = len;
		
		fileData = ptr;

		fname = name;
	}

	Data(const String &name)
	{
		fileLenght = 0;
		
		fileData = "";

		fname = name;
	}
	~Data();

	virtual bool isOk() const
	{
		return fileData.size()!=0;
	}
	
	const String &getFileName()
	{
		return fname;
	}
	
	const String &getString();
	
	bool	isEmpty () const
	{
		if(fileData.length() < 1)
		
			return true;

		return false;
	}

	int	getLength () const
	{
		return fileLenght;
	}

	int	getPos () const
	{
		return 0;
	}

	static Data *getDataFromFile(const String &fileName);
	
};
}
}
#endif